const fs = require('fs')
const path = require("path")


const readFile = function readFile (filePath) {
    // const basePath = path.resolve(__dirname,filePath)
    // console.log("basePath:",basePath)
    return new Promise((resolve, reject) => {
        fs.readFile(filePath, "utf8", (err, data) => {
            if(err) {
                reject(err);
                return
            }
            resolve(data)
        })
    })
}

module.exports = {readFile}
